package com.nanhai.buddhist.college.module.study.service.attendancemanagement;

import com.nanhai.buddhist.college.framework.common.pojo.PageResult;
import com.nanhai.buddhist.college.module.study.controller.admin.attendancemanagement.vo.AttendanceManagementCreateReqVO;
import com.nanhai.buddhist.college.module.study.controller.admin.attendancemanagement.vo.AttendanceManagementExportReqVO;
import com.nanhai.buddhist.college.module.study.controller.admin.attendancemanagement.vo.AttendanceManagementListReqVO;
import com.nanhai.buddhist.college.module.study.controller.admin.attendancemanagement.vo.AttendanceManagementPageReqVO;
import com.nanhai.buddhist.college.module.study.controller.admin.attendancemanagement.vo.AttendanceManagementRespVO;
import com.nanhai.buddhist.college.module.study.controller.admin.attendancemanagement.vo.AttendanceManagementUpdateReqVO;
import com.nanhai.buddhist.college.module.study.controller.student.attendance.vo.StudentManagementPageReqVO;
import com.nanhai.buddhist.college.module.study.controller.teacher.vo.AttendanceManagementAddReq;
import com.nanhai.buddhist.college.module.study.controller.teacher.vo.AttendanceManagementCheckReqVO;
import com.nanhai.buddhist.college.module.study.controller.teacher.vo.ManagementCheckPageReqVO;
import com.nanhai.buddhist.college.module.study.dal.dataobject.attendancemanagement.AttendanceManagementDO;

import javax.validation.Valid;
import java.util.Collection;
import java.util.List;

/**
 * 考勤管理 Service 接口
 *
 * @author HeShuai
 */
public interface AttendanceManagementService {

    /**
     * 创建考勤管理
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    String createAttendanceManagement(@Valid AttendanceManagementCreateReqVO createReqVO);

    /**
     * 更新考勤管理
     *
     * @param updateReqVO 更新信息
     */
    void updateAttendanceManagement(@Valid AttendanceManagementUpdateReqVO updateReqVO);

    /**
     * 删除考勤管理
     *
     * @param id 编号
     */
    void deleteAttendanceManagement(String id);

    /**
     * 获得考勤管理
     *
     * @param id 编号
     * @return 考勤管理
     */
    AttendanceManagementDO getAttendanceManagement(String id);

    /**
     * 获得考勤管理列表
     *
     * @param ids 编号
     * @return 考勤管理列表
     */
    List<AttendanceManagementDO> getAttendanceManagementList(Collection<String> ids);

    /**
     * 获得考勤管理分页
     *
     * @param pageReqVO 分页查询
     * @return 考勤管理分页
     */
    PageResult<AttendanceManagementDO> getAttendanceManagementPage(AttendanceManagementPageReqVO pageReqVO);

    /**
     * 获得考勤管理列表, 用于 Excel 导出
     *
     * @param exportReqVO 查询条件
     * @return 考勤管理列表
     */
    List<AttendanceManagementDO> getAttendanceManagementList(AttendanceManagementExportReqVO exportReqVO);

    /**
     * 教师端请假申请
     */
    String createAttendanceManagement(AttendanceManagementAddReq createReqVO);

    /**
     * 请假审批
     *
     * @param pageVO
     */
    void checkAttendanceLeave(AttendanceManagementCheckReqVO pageVO);

    /**
     * 根据条件获取请假记录
     *
     * @param reqVO
     * @return
     */
    List<AttendanceManagementDO> getAttendanceManagementListByQue(AttendanceManagementListReqVO reqVO);

    /**
     * 根据用户类型查询 请假记录 分页
     *
     * @param req
     * @return
     */
    PageResult<AttendanceManagementDO> getAttendanceManagementPage(StudentManagementPageReqVO req);

    /**
     * 获取审批列表
     * @param pageVO
     * @return
     */
    PageResult<AttendanceManagementDO> getAttendanceManagementCheckPage(ManagementCheckPageReqVO pageVO);

    /**
     * 移动端请假审批分页
     * @param pageVO
     * @return
     */
    PageResult<AttendanceManagementDO> getAttendanceManagementCheckPageApp(ManagementCheckPageReqVO pageVO);

}
